<template>
  <div>
    <div class="Logout">
      <Logout>退出</Logout>
    </div>
    <h1>查询公司信息</h1>
<!--    <el-form>-->
<!--      <el-button @click="count" type="success" icon="el-icon-search">点击查询学生数量</el-button>-->
<!--    </el-form>-->
    <el-table
      :data="this.tableData"
      border
      style="width:100%">
      <el-table-column
        fixed
        prop="sno"
        label="公司id"
        width="200">
      </el-table-column>
      <el-table-column
        prop="sdate"
        label="注册时间"
        width="200">
      </el-table-column>
      <el-table-column
        prop="spassword"
        label="登录密码"
        width="200">
      </el-table-column>
      <el-table-column
        prop="samount"
        label="累计交款额"
        width="200">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import Logout from "./Logout";
export default {
  components:{Logout},
  data() {
    return {
      search_sno: '',
      tableData: '',
      searchData: '',
      sta: false,
      counts:'',
      user: {
        sno: this.search_sno,
        sname: '',
        sdate: '',
        spassword: '',
        samount: '',
      },
      sno: '',
      sname: '',
      sdate: '',
      spassword: '',
      samount: '',
    }
  },
  created(){
    const  _this = this;
    this.$axios.post(`/ShowStudent`).then((res) => {
      console.log(res.data);
      _this.tableData = res.data;
    })
  },
  methods: {
    search(){
      let  _this = this;
      const parmars = {
        sno:this.sno,
        sname:this.sname,
        sdate:this.sdate,
        spassword: this.spassword,
        samount: this.samount,
      }
      this.$axios.post(`/ShowStudentSelect`, parmars).then((res) => {
        console.log(res.data);
        _this.searchData = res.data;
        this.sta = true

      })
    },
    count(){
      this.$axios.post(`/CountStudent`).then((res) => {
        console.log(res.data);
        this.counts = res.data;
        console.log("仓库数量：", this.counts);
        if (res.data.msg=="返回仓库数量成功") {
          alert("仓库数量：" + res.data.data)
        }
      })
    },


  }
}
</script>

<style scoped>

</style>
